<template>
  <div class="form-single-fragment" style="position: relative;">
    <el-form :model="ruleForm" ref="ruleForm" label-width="120px" size="mini" label-position="right">
      <el-row :gutter="20">
        <el-col :span="12">
          <el-form-item label="项目名称">{{ruleForm.projectName}}</el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="公司名称">{{ruleForm.companyName}}</el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="缴纳金额（元）">{{ruleForm.amount}}</el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="缴纳时间">{{ruleForm.paymentDate}}</el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="业务类型">{{ruleForm.businessTypeName}}</el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
import { Securitydeposit } from '@/api/projectAdministration.js';
export default {
  name: 'SecuritydepositDetail',
  props: {
    depositId: {
      default: undefined
    }
  },
  data () {
    return {
      loading: false,
      isShowloading: false,
      ruleForm: {}
    };
  },
  created () {
  },
  computed: {
    isEdit () {
      return this.depositId != null && this.depositId !== '';
    }
  },
  mounted () {
    if (this.isEdit) {
      this.loadDepositdetail()
    }
  },
  methods: {
    /**
     * 保证金详情
     */
    loadDepositdetail () {
      let params = {
        id: this.depositId
      };
      return new Promise((resolve, reject) => {
        Securitydeposit.detail(this, params).then(res => {
          this.ruleForm = res.data
        }).catch(e => {
          reject(e);
        });
      });
    }
  }
}
</script>

<style scoped>
h4{margin-bottom: 0;}
.table_container{margin: 10px 0;}
.form-single-info{display: flex;justify-content: center;}
.el-form-info{box-shadow: 0 0 10px rgba(0,0,0,0.05);padding: 20px;}
.el-form-info strong{margin: 0 10px;}
</style>
